<?php
/* 
 * Copyright (c) 2018-2021   All rights reserved.
 * 
 * 创建时间：2021-08-30 17:36
 *
 * 项目：rm  -  $  - ajax_trades_list.php
 *
 * 作者：liwei 
 */


?>


<?php foreach ($lists as $v):?>
    <li><div class="item-content">
            <div class="item-media icon-img">
                <?=Lev::arrv($v['paytypeid'], $paytypeidIcons)?>
            </div>
            <div class="item-inner">
                <div class="item-title-row">
                    <div class="item-title font14"><?=$v['name']?></div>
                    <div class="item-after"><b class="color-red font14"><?=Lev::formatMoney($v['paymoney'])?></b><span class="inblk scale6">元</span></div>
                </div>
                <div class="item-title-row">
                    <div class="item-title color-gray">
                    <div class="scale6 transl">
                        <?=$v['transaction_id']?:\modules\levpays\table\tradesHelper::getTradeno($v['id'])?>
                    </div>
                    </div>
                    <div class="item-after date transr" style="align-items: center">
                    <?php if (!$v['tradestatus']):?>
                        <a class="button button-fill scale7 transr is_ajax_a" href="<?=Lev::toReRoute(['pay', 'tradeId'=>$v['id']])?>">支付</a>
                        <a class="button button-fill color-gray scale7 transr setTradestatus4" data-opid="<?=$v['id']?>">放弃</a>
                    <?php elseif ($v['paysource'] && $v['tradestatus'] != 1 && (!$v['uptime'] || $v['uptime'] + 7200 > Lev::$app['timestamp'])):?>
                        <a class="button button-fill color-gray scale7 transr checkedTrade" data-opid="<?=$v['id']?>">我已支付</a>
                    <?php else:?>
                        <?=Lev::asRealTime($v['paytime'] ?: $v['addtime'], '');?>
                    <?php endif;?>
                    <?php if ($v['tradestatus']):?>
                    <?php if ($v['tradestatus'] ==1):?>
                        <absxn><?=Lev::arrv($v['tradestatus'], $tradestatuses)?></absxn>
                    <?php else:?>
                        <absxg><?=Lev::arrv($v['tradestatus'], $tradestatuses)?></absxg>
                    <?php endif;?>
                    <?php endif;?>
                    </div>
                </div>
            </div>
        </div>
    </li>
<?php endforeach;?>

